Even when the color temperature of the environment light source varies, a digital camera always performs white balance (WB) processing for making a correction so as to accurately photograph a white article. WB processing includes manual white balance (MWB) processing by means of which the user specifies the type of the environment light source, and automatic white balance (AWB) processing by means of which a camera automatically determines the type of the environment light source. Of these two types of processing, AWB processing includes the steps of dividing a captured image into a plurality of blocks; computing a typical color value of a plurality of pixels constituting each of the blocks; and determining the type of the light source for each of the blocks on the basis of the typical color value. Thus, the environment light source is estimated on the basis of the number of the blocks for each type of light source.
In AWB processing, accurate estimation of the environment light source is indispensable for appropriately effecting white balance processing. To this end, a plurality of techniques for accurately estimating the environment light source (the color of the environment light source) have hitherto been proposed.
For instance, Japanese Patent Publication 2003-309854 describes a technique of accurately estimating, during stroboscopic photographing, the influence of a flash of light on a subject and the influence of fixed light on the subject, and, by extension, the color of the environment light source. According to the technique described in Japanese Patent Publication 2003-309854, preliminary light emission image data pertaining to images acquired by means of preliminarily firing light and comparison image data pertaining to images captured without preliminary firing light are acquired prior to actual photographing. The influence of a flash of light on a subject and the influence of fixed light on the same are determined on the basis of the amount of change between the brightness value of the preliminary light emission image data and that of the comparison image data, as well as on the basis of the degree of influence of preliminary emission of light which affects a brightness value. In consideration of the results of determination, an actually-photographed image is subjected to WB processing.
Japanese Patent Publication 2001-112019 describes a technique of, at the time of determination of a light source of each of blocks (or a block), determining a distance between the typical color difference of an estimated light source, such as a fluorescent lamp or daylight and typical color-difference components of the respective blocks, to thereby determine, from the distance, reliability at which the block is illuminated by the estimated light source. On the basis of the thus-obtained reliability, the typical color difference, and the like, the color of illumination light for the scene of an image (i.e., the color of the environment light source) is determined, and white balance adjustment is performed so as to cancel the color of illumination light. By means of cancellation, an appropriate white balance can be performed more stably.
Incidentally, the color of a white article acquired under a certain type of light source and the color of a colored article acquired under another type of light source are known to be analogous to each other. Put another way, presence of a color range where an erroneous determination of the light source is likely to arise is known. For instance, the color of a green-colored article (e.g., leaves of a plant or the like) acquired under daylight is known to be similar to the color of a white article acquired under fluorescent light. Consequently, when a subject principally occupied by a green article is photographed under daylight, the type of the light source of a block corresponding to the green article is erroneously determined as “fluorescent light.” As a consequence, there may arise a case where the environment light source for all the photographed images is erroneously determined.
In the related-art technique, a color range, where erroneous determination of a light source is likely to arise, is not taken into consideration. Therefore, when the subject has a color which is likely to cause erroneous determination of the light source, an erroneous determination of the environment light source arises, which in turn results in a case where appropriate WB processing cannot be performed.